import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  { path: '/', name: 'Home', component: () => import('../views/Home.vue') },
  { path: '/login', name: '登录/注册', component: () => import('../views/LoginRegister.vue') },
  { path: '/profile', name: '用户资料', component: () => import('../views/UserProfile.vue') },
  { path: '/market', name: '卡牌市场', component: () => import('../views/CardMarket.vue') },
  { path: '/detail', name: '卡牌详情', component: () => import('../views/CardDetail.vue') },
  { path: '/shop', name: '商家主页', component: () => import('../views/ShopHome.vue') },
  { path: '/cart', name: '购物车', component: () => import('../views/Cart.vue') },
  { path: '/orders', name: '订单历史', component: () => import('../views/OrderHistory.vue') },
  { path: '/order-create', name: '下单页', component: () => import('../views/OrderCreate.vue') },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router 